import java.util.Calendar;
//4：输出今年的星期天都是几号
public class Work {
    public static void main(String[] args) {
        Calendar a = Calendar.getInstance();
        a.set(2021, 12 - 1, 31);
        System.out.println("今年的星期天是：");
        for (int i = 0; i < 365; i++) {
            a.add(Calendar.DAY_OF_YEAR, 1);
            if (a.get(Calendar.DAY_OF_WEEK) == 1) {
                System.out.println((a.get(Calendar.MONTH) + 1) + "月" + a.get(Calendar.DATE) + "日");
            }
        }
    }
}